import { MessageBox } from 'element-ui'

class MsgBox {
  constructor() {
    this.isLoging = false
  }
  /**
   * 弹窗
   * @param {Object} param messageBox的参数
   */
  dialog() {
    if (!this.isLoging) {
      this.isLoging = true
      MessageBox.alert(...arguments).finally(() => {
        this.isLoging = false
      })
    }
  }
}

export const msgBox = new MsgBox()
